<?php
/**
 * Template Name: flashgames
 *
 * 通用的footer
 * date:2011/4/11 
 * @author Ryan 
 * 
 */

$siteurl = get_bloginfo('template_url');
get_header();
?>
	<div id="main">
			<h3>热门Flash游戏精选</h3>
			<div id="hotgames_bt" class="game_bt" >
				<ul>
					
				</ul>
			</div>
			<div id="hotgames_search" >
				<div class="wrapper">
					<ul>
				<?php $commends = getCommendGames("Flash小游戏", 18);
					foreach ($commends as $key => $value){
				?>
						<li><a href="<?php echo "/?p=".$value['post_id'];?>"><img src="<?php echo $value['game_img'];?>" width="156" height="133" onerror="this.src='<?php echo $siteurl?>/images/onerror.jpg'" alt="<?php echo $value['post_title'];?>" title="<?php echo $value['post_title'];?>" /></a>
							<a href="<?php echo "/?p=".$value['post_id'];?>" class="gamename"><?php echo $value['post_title'];?></a>
							<a href="<?php echo "/?p=".$value['post_id'];?>" class="gamestyle"><?php echo $value['post_category'];?></a>
						</li>
					<?php }?>	
					</ul>
				</div>
			</div>
		</div>
		<div id="siderbar_Byouxi">
			<h3>最新Flash游戏精选</h3>
			<div id="newstgame_bt" class="game_bt" >
				<ul>
				</ul>
			</div>
			<div class="newstgame_slider ">
				<div class="games_pane sider_content">
						<ul>
						<?php $newest = getNewestGames('Flash小游戏', 72);
							foreach ($newest as $value) {
							
						?>
							<li><a href="<?php echo "/?p=".$value['post_id'];?>"><img src="<?php echo $value['game_img'];?>" onerror="this.src='<?php echo $siteurl?>/images/onerror.jpg'"  alt="<?php echo $value['post_title'];?>" width="104" height="79" title="<?php echo $value['post_title'];?>" /></a>
							<a href="<?php echo "/?p=".$value['post_id'];?>" ><?php echo $value['post_title'];?></a>
							</li>
						<?php }?>
						</ul>
					</div>
				</div>
			</div>
		</div>

<?php get_footer();?>